package cn.com.victorysoft.ylgl.service.commons.mybatis.paging;

/***
 * @author gechaoqing
 */
public enum Database
{
    /***
     * MYSQL
     */
    mysql,
    /***
     * ORACLE
     */
    oracle,
    /***
     * HSQLDB
     */
    hsqldb;

    Database() {}

    public static Database forJdbcUrl(String jdbcUrl)
    {
        Database[] databases = values();
        for (Database db : databases) {
            if (jdbcUrl.contains(db.toString())) {
                return db;
            }
        }
        return null;
    }
}
